<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
		
		<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
		
		<title>{{title}}</title>
		
		<!--                       CSS                       -->
	  
		<!-- Reset Stylesheet -->
		<link rel="stylesheet" href="/static/resources/css/reset.css" type="text/css" media="screen" />
	  
		<!-- Main Stylesheet -->
		<link rel="stylesheet" href="/static/resources/css/style.css" type="text/css" media="screen" />
		
		<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
		<link rel="stylesheet" href="/static/resources/css/invalid.css" type="text/css" media="screen" />	
		
		<!-- Colour Schemes
	  
		Default colour scheme is green. Uncomment prefered stylesheet to use it.
		
		<link rel="stylesheet" href="/static/resources/css/blue.css" type="text/css" media="screen" />
		
		<link rel="stylesheet" href="/static/resources/css/red.css" type="text/css" media="screen" />  
	 
		-->
		
		<!-- Internet Explorer Fixes Stylesheet -->
		
		<!--[if lte IE 7]>
			<link rel="stylesheet" href="/static/resources/css/ie.css" type="text/css" media="screen" />
		<![endif]-->
		
		<!--                       Javascripts                       -->
  
		<!-- jQuery -->
		<script type="text/javascript" src="/static/resources/scripts/jquery-1.3.2.min.js"></script>
		
		<!-- jQuery Configuration -->
		<script type="text/javascript" src="/static/resources/scripts/simpla.jquery.configuration.js"></script>
		
		<!-- Facebox jQuery Plugin -->
		<script type="text/javascript" src="/static/resources/scripts/facebox.js"></script>
		
		<!-- jQuery WYSIWYG Plugin -->
		<script type="text/javascript" src="/static/resources/scripts/jquery.wysiwyg.js"></script>
		
		<!-- jQuery Datepicker Plugin -->
		<script type="text/javascript" src="/static/resources/scripts/jquery.datePicker.js"></script>
		<script type="text/javascript" src="/static/resources/scripts/jquery.date.js"></script>
		<!--[if IE]><script type="text/javascript" src="/static/resources/scripts/jquery.bgiframe.js"></script><![endif]-->

		
		<!-- Internet Explorer .png-fix -->
		
		<!--[if IE 6]>
			<script type="text/javascript" src="/static/resources/scripts/DD_belatedPNG_0.0.7a.js"></script>
			<script type="text/javascript">
				DD_belatedPNG.fix('.png_bg, img, li');
			</script>
		<![endif]-->
		
	</head>
  
	<body><div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
		
		<div id="sidebar"><div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->
			
				<h1 id="sidebar-title"><a href="/">{{title}}</a></h1>
		  
			<!-- Logo (221px wide) -->
			<a href="#"><img id="logo" src="/static/resources/images/logo.png" alt="Simpla Admin logo" /></a>
		  
			<!-- Sidebar Profile links -->
			<div id="profile-links">
				Hello, <a href="#" title="Edit your profile">{{user}}</a>
				<br />
				<a href="/" title="查看站点">查看站点</a> | <a href="/logout" title="Sign Out">登出</a>
			</div>        
			
			<ul id="main-nav">  <!-- Accordion Menu -->
				
				<li>
					<a href="/admin" class="nav-top-item no-submenu"> <!-- Add the class "no-submenu" to menu items with no sub menu -->
						仪表盘
					</a>       
				</li>
				
				<li> 
					<a href="#" class="nav-top-item"> <!-- Add the class "current" to current menu item -->
					文章
					</a>
					<ul>
						<li><a href="/admin/write">写文章</a></li>
						<li><a href="/admin/articles">所有文章</a></li> <!-- Add class "current" to sub menu items also -->
						<li><a href="/admin/comments">管理评论</a></li>
						<li><a href="/admin/categories">管理分类</a></li>
					</ul>
				</li>
				
				<li>
					<a href="#" class="nav-top-item">
						页面
					</a> 
					<ul>
						<li><a href="/admin/pages/new">新建页面</a></li>
						<li><a href="/admin/pages">管理页面</a></li>
					</ul>
				</li>
				
				<li>
					<a href="#" class="nav-top-item">
						设置
					</a>
					<ul>
						<li><a href="/admin/setting">常规</a></li>
					</ul>
				</li>      
				
			</ul> <!-- End #main-nav -->
			
		</div></div> <!-- End #sidebar -->
		
		<div id="main-content"> <!-- Main Content Section with everything -->
			
			<h2>{{BLOG_NAME}}</h2>
			<p id="page-intro">{{SUBTITLE}}</p>
			
			<ul class="shortcut-buttons-set">
				
				<li><a class="shortcut-button" href="/admin/write"><span>
					<img src="/static/resources/images/icons/pencil_48.png" alt="icon" /><br />
					写文章
				</span></a></li>
				
				<li><a class="shortcut-button" href="/admin/pages/new"><span>
					<img src="/static/resources/images/icons/paper_content_pencil_48.png" alt="icon" /><br />
					新建页面
				</span></a></li>
				
				<li><a class="shortcut-button" href="/admin/image/upload"><span>
					<img src="/static/resources/images/icons/image_add_48.png" alt="icon" /><br />
					上传图片
				</span></a></li>
				<!--
				<li><a class="shortcut-button" href="#"><span>
					<img src="/static/resources/images/icons/clock_48.png" alt="icon" /><br />
					Add an Event
				</span></a></li>
				
				<li><a class="shortcut-button" href="#messages" rel="modal"><span>
					<img src="/static/resources/images/icons/comment_48.png" alt="icon" /><br />
					Open Modal
			</span></a></li>
			-->
				
			</ul><!-- End .shortcut-buttons-set -->
			
			<div class="clear"></div> <!-- End .clear -->
			
			<div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>最新文章</h3>
					
					<div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
						<form action="/admin/articles/bulkdel" method="post">
						<table>
							
							<thead>
								<tr>
								   <th><input class="check-all" type="checkbox" /></th>
								   <th>标题</th>
								   <th>分类</th>
								   <th>标签</th>
								   <th>提交日期</th>
								   <th>操作</th>
								</tr>
								
							</thead>
						 
							<tfoot>
								<tr>
									<td colspan="6">
										<div class="bulk-actions align-left">
											<select name="dropdown">
												<option value="option1">选择一个操作</option>
												<option value="del">删除</option>
											</select>
											<input type="submit" class="button" name="submit" id="submit" value="应用" />
										</div>
									</td>
								</tr>
							</tfoot>
						 
							<tbody>
							%if articles:
							%for art in articles:
								%artid = art.get('_id', '')
								%arttitle = art['title']
								%date = art['date']
								%ts = ''
								%for tag in art['tags']:
									%t = '<a  href="/tags/'+tag+'">'+tag+'</a>,'
									%ts += t
								%end
								%tags = ts[0:-1]
								%if art.get('categories'):
									%cates = ''
									%for cate in art.get('categories',[]):
										%c = '<a  href="/categories/'+str(cate.get('_id'))+'">'+cate.get('name')+'</a>,'
										%cates += c
									%end
									%categories = cates[0:-1]
								%else:
								%categories = '<a href="/categories/nocategorie">未分类</a>'
								%end
								<tr>

									<td><input type="checkbox" name="art-{{artid}}" id="art-{{artid}}" value="{{artid}}" /></td>
									<td>{{arttitle}}</td>
									<td>{{!categories}}</td>
									<td>{{!tags}}</td>
									<td>{{date}}</td>
									<td>
										<!-- Icons -->
										<a href="/admin/articles/edit/{{artid}}" title="编辑"><img src="/static/resources/images/icons/pencil.png" alt="编辑" /></a>
										<a href="/admin/articles/del/{{artid}}" title="删除"><img src="/static/resources/images/icons/cross.png" alt="删除" /></a> 
									</td>
								</tr>
							%end
							%end
							</tbody>
							
						</table>
						</form>
						
					</div> <!-- End #tab1 -->										
                </div> <!-- End .content-box-content -->
            </div>
			<div class="content-box"><!-- Start Content Box -->
			
			<div class="content-box column-left">
				
				<div class="content-box-header">
					
					<h3>关于此作品</h3>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab">
					
						<h4>关于此作品</h4>
						<p>
					此版本为学习而写,其中模板来自网络,使用mongodb作为数据库,使用Python bottle开发,模板引擎使用内置的.现以加入MySQL支持!
						</p>
						
					</div> <!-- End #tab3 -->              
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->
			
			<div class="content-box column-right">
				
				<div class="content-box-header"> <!-- Add the class "closed" to the Content box header to have it closed by default -->
					
					<h3>联系作者</h3>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab">
					
						<h4>如果需要技术支持</h4>
						<p>
                        作者博客为<a href="http://www.linuxzen.com">www.linuxzen.com</a>,如果您要提交bug请发邮件到wh_linux@126.com
						</p>
						
					</div> <!-- End #tab3 -->        
						
					</div> <!-- End #tab3 -->        
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->
			<div class="clear"></div>
			
			<div id="footer">
				<small> <!-- Remove this notice or replace it with whatever you want -->
						&#169; Copyright 2012 cold night | Powered by <a href="http://www.linuxzen.com">cold night</a> | <a href="#">Top</a>
				</small>
			</div><!-- End #footer -->
			
		</div> <!-- End #main-content -->
		
	</div></body>
  

<!-- Download From www.exet.tk-->
</html>
